package com.atguigu.yygh.msm.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantPropertiesUtils implements InitializingBean {
    @Value("${tengxunyun.sms.appid}")
    private int appid;

    @Value("${tengxunyun.sms.appkey}")
    private String appkey;

    @Value("${tengxunyun.sms.templateId}")
    private int templateId;

    @Value("${tengxunyun.sms.smsSign}")
    private String smsSign;

    public static int APP_ID;
    public static String APP_KEY;
    public static int TEMPLATE_ID;
    public static String SMS_SIGN;

    @Override
    public void afterPropertiesSet() throws Exception {
        APP_ID=appid;
        APP_KEY=appkey;
        TEMPLATE_ID=templateId;
        SMS_SIGN=smsSign;
    }
}
